<!DOCTYPE HTML>
<html>
<head>
<#include "headImport.html">
<style>
.p20 {
	margin-left: 20px;
}

/* ul li以横排显示 */

/* 所有class为menu的div中的ul样式 */
.ssjs {
	border: 1px solid #e9e9e9;
	min-height: 200px;
}

div.dsmenu {
	height: 120px;
	border: 1px solid #e9e9e9;
}

div.dsmenu ul {
	list-style: none; /* 去掉ul前面的符号 */
	margin: 0px; /* 与外界元素的距离为0 */
	padding: 0px; /* 与内部元素的距离为0 */
	width: auto; /* 宽度根据元素内容调整 */
}
/* 所有class为menu的div中的ul中的li样式 */
div.dsmenu ul li {
	float: left; /* 向左漂移，将竖排变为横排 */
	margin-top: 10px;
	text-align: center;
}
/* 所有class为menu的div中的ul中的a样式(包括尚未点击的和点击过的样式) */
div.dsmenu ul li a,div.menu ul li a:visited {
	color: #dde4ec; /* 文字颜色 */
	display: block; /* 此元素将显示为块级元素，此元素前后会带有换行符 */
	line-height: 1.35em; /* 行高 */
	/*     padding: 4px 20px; /* 内部填充的距离 */ */
	text-decoration: none; /* 不显示超链接下划线 */
	white-space: nowrap; /* 对于文本内的空白处，不会换行，文本会在在同一行上继续，直到遇到 <br> 标签为止。 */
}
/* 所有class为menu的div中的ul中的a样式(鼠标移动到元素中的样式) */
div.dsmenu ul li a:hover { /*     background-color: #bfcbd6; /* 背景色 */
	*/
	color: #465c71; /* 文字颜色 */
	text-decoration: none; /* 不显示超链接下划线 */
}
/* 所有class为menu的div中的ul中的a样式(鼠标点击元素时的样式) */
div.dsmenu ul li a:active {
	background-color: #465c71; /* 背景色 */
	color: #cfdbe6; /* 文字颜色 */
	text-decoration: none; /* 不显示超链接下划线 */
}

div.dsmenu ul li p.menuDesc {
	margin-top: 10px;
}

span.ssdt-title {
	font-size: 16px;
	color: black;
	font-weight: bold;
}

.ptxt {
	margin-top:10px;
	line-height: 25px;
}

/* p.ptxt::after { */
/* 	content: "..."; */
/* 	font-weight: bold; */
/* 	position: absolute; */
/* 	bottom: 0; */
/* 	right: 0; */
/* 	padding: 0 20px 1px 45px; */
/* 	background: url(static/cms/www/default/images/ellipsis_bg.png) repeat-y; */
/* } */

.ipt {
	border: 1px solid #d3d3d3;
	padding: 10px 10px;
	width: 290px;
	border-radius: 4px;
	padding-left: 35px;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow
		ease-in-out .15s;
	-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out
		.15s;
	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s
}

.ipt:focus {
	border-color: #66afe9;
	outline: 0;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px
		rgba(102, 175, 233, .6);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px
		rgba(102, 175, 233, .6)
}

.u_logo {
	background: url("static/jmax/images/username.png") no-repeat;
	padding: 10px 10px;
	position: absolute;
	top: 43px;
	left: 40px;
}

.p_logo {
	background: url("static/jmax/images/password.png") no-repeat;
	padding: 10px 10px;
	position: absolute;
	top: 12px;
	left: 40px;
}

.theme-popover-mask {
	z-index: 9998;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000;
	opacity: 0.4;
	filter: alpha(opacity = 40);
	display: none;
}

.theme-poptit {
	margin-top: 20px;
}

.theme-poptit .close {
	float: right;
	color: #999;
	padding: 5px;
	margin: -20px -0px -5px;
	font: bold 14px/14px simsun;
	text-shadow: 0 1px 0 #ddd;
}

.theme-popover {
	border-radius: 5px;
	border: solid 2px #666;
	box-shadow: 0 0 10px #666;
	background: rgb(255, 255, 255);
	margin: -100px auto auto;
	border: 1px solid rgb(231, 231, 231);
	border-image: none;
	width: 400px;
	height: 270px;
	text-align: center;
	z-index: 9999;
	position: fixed;
	top: 50%;
	left: 50%;
	margin: -135px 0 0 -200px;
	display: none;
	box-shadow: 0 0 10px #666;
}
/* a { */
/* 	text-decoration: none; */
/* } */
</style>
<script>
function refreshCaptcha() {
	$("#img_captcha").attr("src","captcha.jpg?t=" + Math.random());
}
function login() {
	if ($("input[name='loginName']").val() == "") {
		alert("帐号不能为空，请输入");
		$("input[name='loginName']").focus();
		return;
	} 
	if($("input[name='password']").val() == "") {
		alert("密码不能为空，请输入");
		$("input[name='password']").focus();
		return;
	}
	
	//ajax异步提交  
	$.ajax({
		type : "POST",
		url : "authLogin.action?login&matchProjectId=${(matchProject.id)!}",
		data : $("#loginForm").serialize(), //序列化               
		error : function(request) { // 设置表单提交出错 
			alert('登陆错误'); //登录错误提示信息
		},
		success : function(data) {
			var d = $.parseJSON(data); 
			if (d.success) {
				window.open('main.do?main');
			} else {
				alert(d.msg)
			}
			
		}
	});
}
jQuery(document).ready(function($) {
	<#if (matchProject.matStatu)??&&matchProject.matStatu=='doing'>
	$('.bm-login').click(function(){
		$('.theme-popover-mask').fadeIn(100);
		$('.theme-popover').slideDown(200);
		refreshCaptcha();
	})
	$('.theme-poptit .close').click(function(){
		$('.theme-popover-mask').fadeOut(100);
		$('.theme-popover').slideUp(200);
	})
	</#if>
})

function downloadResFile(resId){
	if($('#downloadForm')) $('#downloadForm').remove();
	var downloadForm  = $("<form id=\"downloadForm\">");//定义一个form表单
	downloadForm.attr("style","display:none");
	downloadForm.attr("target","");
	downloadForm.attr("method","post");
	downloadForm.attr("action",'match.action?downLoadResFile&resId='+resId);
	var input1=$("<input>");
	input1.attr("type","hidden");
	input1.attr("name","downLoadCode");
	input1.attr("value",(new Date()).getMilliseconds()); 
	$("body").append(downloadForm);//将表单放置在web中
	downloadForm.append(input1);
	downloadForm.submit();//表单提交
	return false;
}

function loadFiles(aTag) {
	
	$("a."+aTag).each(function(){
        var v = $(this).attr("href");
        console.log(v);
        downloadFile(v);
//         var did = v.substr(v.lastIndexOf("=")+1,v.length-v.lastIndexOf("="));    
    }); 
}

</script>
</head>
<body>
<#include "newHeader.html">
<div class="container1100 clearfix adTop dsmenu">
	<ul>
            <li style="margin-left:50px;">
            	<#if (matchProject.matIntroducePublish)??&&matchProject.matIntroducePublish=='1'>
	            	<a href="cms.action?skip&navCode=sshdXq&subNav=ssjs&sshdId=${(matchProject.id)!}">
	            	<#if subNav??&&subNav=='ssjs'>
	            	<img src="static/cms/www/default/images/ssjs-active.png"/>
	            	<#else>
	            	<img src="static/cms/www/default/images/ssjs-enable.png"/>
	            	</#if>
	            	</a>
	            <#else>
            		<a href="#">
            			<img src="static/cms/www/default/images/ssjs-disable.png"/>
            		</a>
            	</#if>
            	<p class="menuDesc">
            		赛事介绍
            	</p>
            	
            </li>
            <li style="margin-left:85px;">
            	<a href="cms.action?skip&navCode=sshdXq&subNav=ssdt&sshdId=${(matchProject.id)!}">
            	<#if subNav??&&subNav=='ssdt'>
            	<img src="static/cms/www/default/images/ssdt-active.png"/>
            	<#else>
            	<img src="static/cms/www/default/images/ssdt-enable.png"/>
            	</#if>
            	</a>
            	<p class="menuDesc">
            		赛事动态
            	</p>
            </li>
            <li style="margin-left:85px;">
            	<#if (matchProject.matResultPublish)??&&matchProject.matResultPublish=='1'>
	            	<a href="cms.action?skip&navCode=sshdXq&subNav=ssjg&sshdId=${(matchProject.id)!}">
	            	<#if subNav??&&subNav=='ssjg'>
	            	<img src="static/cms/www/default/images/ssjg-active.png"/>
	            	<#else>
	            	<img src="static/cms/www/default/images/ssjg-enable.png"/>
	            	</#if>
	            	</a>
	            <#else>
            		<a href="#">
            			<img src="static/cms/www/default/images/ssjg-disable.png"/>
            		</a>
            	</#if>
            	<p class="menuDesc">
            		赛事结果
            	</p>
            </li>
            <li style="margin-left:85px;" class="bm-login">
            	<#if matchProject.matStatu=='doing'>
	            	<a href="javascript:void">
	            	<#if subNav??&&subNav=='csbm'>
	            	<img src="static/cms/www/default/images/csbm-active.png"/>
	            	<#else>
	            	<img src="static/cms/www/default/images/csbm-enable.png"/>
	            	</#if>
	            	</a>
	            <#else>
            		<a href="#">
            			<img src="static/cms/www/default/images/csbm-disable.png"/>
            		</a>
            	</#if>
            	<p class="menuDesc">
            		参赛报名
            	</p>
            </li>
            <li style="margin-left:85px;">
            	<a href="cms.action?skip&navCode=sshdXq&subNav=csxm&sshdId=${(matchProject.id)!}">
            	<#if subNav??&&subNav=='csxm'>
            	<img src="static/cms/www/default/images/csxm-active.png"/>
            	<#else>
            	<img src="static/cms/www/default/images/csxm-enable.png"/>
            	</#if>
            	</a>
            	<p class="menuDesc">
            		参赛项目
            	</p>
            </li>
            <li style="margin-left:85px;">
            	<a href="cms.action?skip&navCode=sshdXq&subNav=zlxz&sshdId=${(matchProject.id)!}">
            	<#if subNav??&&subNav=='zlxz'>
            	<img src="static/cms/www/default/images/zlxz-active.png"/>
            	<#else>
            	<img src="static/cms/www/default/images/zlxz-enable.png"/>
            	</#if>
            	</a>
            	<p class="menuDesc">
            		资料下载
            	</p>
            </li>
        </ul>
</div>
<div class="container cyds clearfix ssjs" style="margin-top:30px;margin-bottom:10px;"> 
	<#switch subNav>
		<#case "ssjs">
		${(matchProject.matIntroduceDes)!'赛事筹备中……'}
		<#break>
		<#case "ssjg">
		${(matchProject.matResultDes)!'赛事结果未发布……'}
		<#break>
		<#case "ssdt">
		<#list ssdtList as dt>
    <section>
    	<div class="item clearfix" style="padding-top:20px;padding-bottom:20px;border-bottom: 1px solid gray;">
          <a href="match.action?getMatchDynaContent&id=${(dt.id)!}" target="_blank" class="leftImg" style="width: 240px;"><img src="${(dt.logoPath)!}" width="240" height="160" onerror="this.src='static/cms/www/default/images/csmrtp.jpg'"></a>
          <div class="text" style="float:left;width:608px;">
            <div class="des" style="line-height: 30px;color: black;"><a href="match.action?getMatchDynaContent&id=${(dt.id)!}" target="_blank"><span class="ssdt-title">${(dt.name)!}</span></a></div>
           <div class="des">
           <p class="ptxt" >
           	${(dt.dynContent)!}
           </p>
           </div>
          </div>
      
      	   <div style="float:left;width:130px;margin-top: 130px;">
      	   		<span style="margin-left:30px;">${(dt.publishDate)!}</span>
      	   </div>
         </div>
         
     </section>
     </#list>
     <#if ssdtPager??&&subNav=='ssdt'>  		
		<div class="page-large">
			<div style="display:inline-block;">
					<#if ssdtPager.showPre>
						<a href="#" class="prev-page" onclick='location.href=encodeURI("${ssdtPager.preUrl!}");'></a>
		     		</#if>
		     		<#list ssdtPager.pagerIndexs as pi>
		     			<a class="Num <#if pi.activePage>on</#if>" href="#" onclick='location.href=encodeURI("${(pi.url)!}");'>${(pi.pageNo)!}</a>
		     		</#list>
		     		<#if ssdtPager.showNext>
		     			<a class="next-page" href="#" onclick='location.href=encodeURI("${ssdtPager.nextUrl!}");'></a>
		     		</#if>
			</div>
		</div>
		</#if>
		<#break>
		<#case "zlxz">
		<#list zlxzList as zl>
	<section>
    	<div class="item clearfix" style="border-bottom: 1px solid #d8d3d3;">
	    	<div style="margin-left: 100px;margin-top: 30px;">
	    		<span style="font-size: 16px;font-weight: bold;">${(zl.name)!}</span>
	    		<span style="float: right;margin-right: 20px;">2017-05-05</span>
	    	</div>
	    	<div style="margin-left: 120px;line-height: 30px;color:gray;">
	    		${(zl.resContent)!}
	    	</div>
	    	<#if zl.resAttchItems??>
	    	<div class="loadRs" style="margin-left: 100px;margin-bottom:20px;">
	    		<#list zl.resAttchItems as ra>
	    			<p style="color:green;line-height: 30px;">附件${ra_index+1}：<a href="${(ra.attchPath)!}" class="zxlz${(zl.id)!}" style="color:green;">${(ra.name)!}</a></p>
	    		</#list>
	    		<button style="border: 1px solid gray;border-radius: 3px;padding: 5px 5px;" onclick="downloadResFile(${(zl.id)!})">全部下载</button>	    		
	    	</div>
	    	</#if>
    	</div>
    </section>
		</#list>
		<#break>
		
		<#default>
	</#switch>
</div>

<#if (matchProject.matCollaborator)??>
<#if ((matchProject.matCollaboratorPublish)??&&(matchProject.matCollaboratorPublish=='1'))||(look??&&look=='1')>
<div class="container" style="border: 1px solid #e9e9e9;margin-bottom: 20px;">
	${(matchProject.matCollaborator)!''}
</div>
</#if>
</#if>
<#include "footer.html">

	<div class="theme-popover">
		<div class="theme-poptit">
	          <a href="javascript:;" title="关闭" class="close">×</a>
	          <h3>参赛团队报名</h3>
	    </div>
		<form id="loginForm" method="post">
			<p style="padding: 30px 0px 10px; position: relative;">
				<span class="u_logo"></span> <input class="ipt" type="text" name="loginName" placeholder="请输入用户名" value="" />
			</p>
			<p style="position: relative;">
				<span class="p_logo"></span> <input class="ipt" id="password" name="password" type="password" placeholder="请输入密码" value="">
			</p>
			<p style="position: relative;top:12px;left: -40px;">
				<input class="captcha ipt" style="width:210px;" id="captcha" name="captcha" type="text" placeholder="请输入验证码" value=""> 
				<span style="position: absolute;">
				<a href="#"><img alt="验证码" src="captcha.jpg" title="看不清楚？点击更换" id="img_captcha" onclick="javascript:refreshCaptcha();"></a>
				</span>
			</p>
		</form>
		<div style="height: 50px; margin-top: 30px;">
			<p>
				<a style="background:#ef3838; padding: 10px 155px; border-radius: 4px; border: 1px solid #ef3838; border-image: none; color: rgb(255, 255, 255); font-weight: bold;" href="#" onclick="login()">登录</a> 
			</p>
		</div>
	</div>
	
	<div class="theme-popover-mask"></div>
</body>
</html>